<extend name="Layout/ins_popup" />
<block name="content">
	<div class="popup-fixed">
		<div class="popup-header clearfix">
			<div class="pull-left">
				<h1>新建群组</h1>
			</div>
			<div class="pull-right">
				<a onclick="save();" class="btn btn-sm btn-primary">确定</a>
				<a onclick="myclose();" class="btn btn-sm btn-default">关闭</a>
			</div>
		</div>
		<div class="popup-body" style="height: 420px;overflow-y: auto;">
			<form id="form_data" name="form_data"method="post" class="form-horizontal clearfix">
				<input type="hidden" name="ajax" id="ajax" value="0">
				<input type="hidden" name="opmode" id="opmode" value="add">
				<div class="form-group col-xs-12">
					<label class="col-xs-2 control-label" for="name">名称*：</label>
					<div class="col-xs-10">
						<input class="form-control"  type="text" id="name" name="name" check="require" msg="请输入名称">
					</div>
				</div>

				<div class="form-group col-xs-12">
					<label class="col-xs-2 control-label" for="sort">排序：</label>
					<div class="col-xs-10">
						<input class="form-control"  type="text" id="sort" name="sort" >
					</div>
				</div>
				<div class="form-group col-xs-12">
					<label class="col-xs-2 control-label" for="is_public">是否公开：</label>
					<div class="col-xs-10">
						<select  class="form-control" name="is_public" id="is_public">
							<option  value="0">私有</option>
							<option value="1">公开</option>
						</select>
					</div>
				</div>
				<div class="form-group col-xs-12">
					<label class="col-xs-2 control-label" for="is_del">状态：</label>
					<div class="col-xs-10">
						<select  class="form-control" name="is_del" id="is_del">
							<option  value="0">启用</option>
							<option value="1">禁用</option>
						</select>
					</div>
				</div>
				<div class="form-group col-xs-12">
					<label class="col-xs-2 control-label" for="remark" >备注：</label>
					<div class="col-xs-10" >
						<textarea class="form-control" name="remark" id="remark" rows="5" class="col-xs-12" ></textarea>
					</div>
				</div>
			</form>
		</div>
	</div>
</block>
<block name="js">
	<script type="text/javascript">
		function save() {
			var vars = $("#form_data").serialize();
			sendAjax("{:U('save')}", vars, function(data) {
				if (data.status) {
					ui_alert(data.info, function() {
						parent.location.reload(true);
						myclose();
					});
				} else {
					ui_error(data.info);
				}
			});
		}
	</script>
</block>